package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.CarCustomerMapper;
import com.ruoyi.system.domain.CarCustomer;
import com.ruoyi.system.service.ICarCustomerService;

/**
 * 用户信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-09-15
 */
@Service
public class CarCustomerServiceImpl implements ICarCustomerService {
	@Autowired
	private CarCustomerMapper carCustomerMapper;

	/**
	 * 查询用户信息
	 * 
	 * @param id 用户信息主键
	 * @return 用户信息
	 */
	@Override
	public CarCustomer selectCarCustomerById(Long id) {
		return carCustomerMapper.selectCarCustomerById(id);
	}

	/**
	 * 查询用户信息列表
	 * 
	 * @param carCustomer 用户信息
	 * @return 用户信息
	 */
	@Override
	public List<CarCustomer> selectCarCustomerList(CarCustomer carCustomer) {
		return carCustomerMapper.selectCarCustomerList(carCustomer);
	}

	/**
	 * 新增用户信息
	 * 
	 * @param carCustomer 用户信息
	 * @return 结果
	 */
	@Override
	public int insertCarCustomer(CarCustomer carCustomer) {
		carCustomer.setCreateTime(DateUtils.getNowDate());
		return carCustomerMapper.insertCarCustomer(carCustomer);
	}

	/**
	 * 修改用户信息
	 * 
	 * @param carCustomer 用户信息
	 * @return 结果
	 */
	@Override
	public int updateCarCustomer(CarCustomer carCustomer) {
		carCustomer.setUpdateTime(DateUtils.getNowDate());
		return carCustomerMapper.updateCarCustomer(carCustomer);
	}

	/**
	 * 批量删除用户信息
	 * 
	 * @param ids 需要删除的用户信息主键
	 * @return 结果
	 */
	@Override
	public int deleteCarCustomerByIds(Long[] ids) {
		return carCustomerMapper.deleteCarCustomerByIds(ids);
	}

	/**
	 * 删除用户信息信息
	 * 
	 * @param id 用户信息主键
	 * @return 结果
	 */
	@Override
	public int deleteCarCustomerById(Long id) {
		return carCustomerMapper.deleteCarCustomerById(id);
	}

	/**
	 * @MethodName: selectByWxId
	 * @Description: TODO
	 * @date: 2024-10-04 21:52:37
	 */
	@Override
	public CarCustomer selectByWxId(String wxId) {
		return carCustomerMapper.selectByWxId(wxId);
	}

	/**  
	 * @MethodName: updateCarCustomerByWxId
	 * @Description: TODO
	 * @date: 2024-10-07 20:39:54 
	 */ 
	@Override
	public int updateCarCustomerByWxId(CarCustomer carCustomer) {
		return carCustomerMapper.updateCarCustomerByWxId(carCustomer);
	}
}
